<?php

$debug = !env('APP_DEBUG');

return [
    '0' => ['code' => 'SUCCESS', 'msg' => '成功'],
    '1' => ['code' => 'FAILED', 'msg' => '失败'],
    '2' => ['code' => 'DANGEROUS', 'msg' => '非法操作'],


    //参数校验级错误101-199
    '101' => ['code' => 'PARAM_FAIL', 'msg' => $debug ? '抱歉，网络开小差了，请刷新页面重试' : '参数校验失败'],

    //通用错误 201-299
    '201' => ['code' => 'SMSCODE_SNED_FAIL', 'msg' => '验证码发送失败'],
    '202' => ['code' => 'SMSCODE_CHECK_FAIL', 'msg' => '验证码校验失败'],

    // 用户类错误
    '401' => ['code' => 'TOKEN_TIME_OUT', 'msg' => '用户登录过期'],
    '402' => ['code' => 'NO_REGISTER', 'msg' => '用户未注册'],
    '403' => ['code' => 'REGISTERED', 'msg' => '用户已注册'],
    '410' => ['code' => 'PASSWORD_CHANGE_FAIL', 'msg' => '密码修改失败'],


    //系统级错误501-599
    '501' => ['code' => 'REQUEST_METHODS_ERROR', 'msg' => $debug ? '抱歉，网络开小差了，请刷新页面重试' : '请求方式错误'],
    '502' => ['code' => 'NO_ROUTER', 'msg' => $debug ? '抱歉，网络开小差了，请刷新页面重试' : '路由错误'],
    '503' => ['code' => 'NOT_FOUND', 'msg' => $debug ? '抱歉，网络开小差了，请刷新页面重试' : '业务Coding异常'],
    '505' => ['code' => 'NOT_FOUND', 'msg' => $debug ? '抱歉，网络开小差了，请刷新页面重试' : '调用不存在'],
    '506' => ['code' => 'DATABASE_FAIL', 'msg' => $debug ? '抱歉，网络开小差了，请刷新页面重试' : '数据库操作失败'],
    '507' => ['code' => 'SERVICE_FAIL', 'msg' => $debug ? '抱歉，网络开小差了，请刷新页面重试' : '服务调用失败'],

    // 常用错误 10001-10999
    '10001' => ['code' => 'LOCK_FAILURE', 'msg' => $debug ? '请勿重复操作' : '加锁失败'],
    '10002' => ['code' => 'DATA_NOT_FOUND', 'msg' => '数据不存在'],
    '10003' => ['code' => 'NON_PERSONAL_OPERATION', 'msg' => '不是本人操作'],
    '10004' => ['code' => 'SENSITIVE_CHECK_FAIL', 'msg' => '触发敏感词'],
    '10005' => ['code' => 'IMG_SENSITIVE_CHECK_FAIL', 'msg' => '上传图片违规'],
    '10006' => ['code' => 'RESOURCE_SAVE_FAILED', 'msg' => '资源保存异常'],

    //技能，宝物，时光，交友
    '20001' => ['code' => 'NOT_PUBLISHED', 'msg' => '未发布'],
    '20002' => ['code' => 'NUM_LIMIT', 'msg' => '数量超过限制'],
    '20003' => ['code' => 'NO_REPEATED_COMPLAINTS', 'msg' => '不能重复投诉'],
    '20004' => ['code' => 'VIP_LOOK', 'msg' => '非VIP不可查看'],
    '20005' => ['code' => 'PUBLISH_STATUS_INVALID', 'msg' => '发布状态无效'],
    '20006' => ['code' => 'PRICE_OUT_OF_RANGE', 'msg' => '价格超出范围'],

    //用户
    '30001' => ['code' => 'USER_NOT_FOUND', 'msg' => '用户不存在'],
    '30002' => ['code' => 'VIP_NOT_FOUND', 'msg' => 'VIP不存在'],
    '30003' => ['code' => 'VIP_NOT_FOUND', 'msg' => '没有权限'],
    '30004' => ['code' => 'NO_FINISH_TRADE', 'msg' => '还有未完成的交易'],

    //资产
    '40001' => ['code' => 'ASSET_NOT_FOUND', 'msg' => '账户不存在'],

    //  交易
    '50001' => ['code' => 'ORDER_FAILED', 'msg' => '订单交易失败'],
    '50002' => ['code' => 'ORDER_NOT_FOUND', 'msg' => '订单不存在'],
    '50003' => ['code' => 'ORDER_STATUS_EXCEPTION', 'msg' => '订单状态异常'],
    '50004' => ['code' => 'BUYER_NO_MATCH', 'msg' => '买家不匹配'],
    '50005' => ['code' => 'SELLER_NO_MATCH', 'msg' => '卖家不匹配'],
    '50006' => ['code' => 'ORDER_SCENE_EXCEPTION', 'msg' => '订单场景异常'],
    '50007' => ['code' => 'ORDER_SCENE_EXCEPTION', 'msg' => '每个用户每月只能领取2次免费赠送的宝物'],

    //  用户互动
    '60001' => ['code' => 'COMMENT_NOT_FOUND', '评论信息不存在'],
    '60002' => ['code' => 'REPLY_NOT_FOUND', '回复信息不存在'],
    '60003' => ['code' => 'REPEAT_FACE_AUTH', '重复人脸认证'],
    '60004' => ['code' => 'FACE_AUTH_FAILED', '人脸认证异常'],
    '60005' => ['code' => 'REPEAT_INVITE_BIND', '重复绑定'],
    '60006' => ['code' => 'NOT_FOUND_INVITE_CODE', '邀请码不存在'],
    '60007' => ['code' => 'REPEAT_JOB_AUTH', '重复职业认证'],
    '60008' => ['code' => 'FACE_NO_CHECK', '请先完成身份认证'],
    '60009' => ['code' => 'DELETED_EXCEPTION', '删除失败'],
    '60010' => ['code' => 'NO_DELETED_PERMISSION', '暂无删除权限'],
];
